home *** CD-ROM | disk | FTP | other *** search
/ Enter 2005 January / EnterCD 0105.iso / Internet / Norton Internet Security 2005 / NIS_Retail.EXE / Setup / ISCommon / APP / AlertAst.exe / HTML / ALERTAST.JS < prev    next >
Encoding:
JavaScript  |  2004-08-31  |  4.7 KB  |  158 lines

  1. ///////////////////////////////////////////////////////////////////////////
  2. //
  3. //strKnownApplicationList is the list of known programs.  When adding to this
  4. //list, be sure to prepend the operating system type to the new entries.
  5. //The following operating system types are supported:
  6. //98, me, 2k, xp
  7. //
  8. ///////////////////////////////////////////////////////////////////////////
  9.  
  10. var strKnownApplicationList = "98_subsystem,98_svchost.exe,98_rundll32.exe,98_wininit.exe,me_subsystem,me_svchost.exe,me_rundll32.exe,me_explorer.exe,me_spool32.exe, 2k_subsystem,2k_svchost.exe,2k_mstask.exe,2k_navapw32.exe,2k_csrss.exe,2k_lsass.exe,2k_winlogon.exe, xp_subsystem,xp_svchost.exe,xp_mstsc.exe,xp_rdpclip.exe,xp_mstask.exe,xp_navapw32.exe,xp_csrss.exe,xp_lsass.exe";
  11.  
  12.  
  13. function getArgs()
  14. {
  15.   var args = new Object();
  16.   var query = window.external.ObjectArg.Params;
  17.   
  18.   if(query.charAt(0) == "#")
  19.   {
  20.     query = query.substr(1);
  21.   }
  22.   
  23.   var pairs = query.split(",");               // Break at comma.
  24.   for(var i = 0; i < pairs.length; i++)
  25.   {
  26.     var pos = pairs[i].indexOf('=');          // Look for "name=value".
  27.     if (pos == -1)
  28.       continue;                               // If not found, skip.
  29.     var argname = pairs[i].substring(0,pos);  // Extract the name.
  30.     var value = pairs[i].substring(pos+1);    // Extract the value.
  31.     args[argname] = unescape(value);          // Store as a property.
  32.   }
  33.   return args;                                // Return the object.
  34. }
  35.  
  36. function DrawFooter()
  37. {
  38.     //Depending on the version of the product, pick the
  39.     //appropriate footer graphic
  40.  
  41.     var WrapNisum = new ActiveXObject("WrapUM.WrapNISUM");
  42.     var pt = WrapNisum.ProductType;
  43.     var szFooter;
  44.     
  45.     switch(pt)
  46.     {
  47.     case "PT_NPF":
  48.         szFooter = "<img width=100% border=0 src=\"branding_bar_npf.gif\"/>";
  49.            break;
  50.     case "PT_PRO":
  51.         szFooter = "<img width=100% border=0 src=\"branding_bar_nispro.gif\"/>";
  52.            break;
  53.     case "PT_SCF":
  54.         szFooter = "<img width=100% border=0 src=\"branding_bar_scf.gif\"/>";
  55.         break;
  56.     default:
  57.         szFooter = "<img width=100% border=0 src=\"branding_bar.gif\"/>";
  58.            break;
  59.     }
  60.     
  61.     document.write(szFooter);
  62. }
  63.  
  64. function DrawPopup(strProgramName)
  65. {
  66.     //alert("KnownApplications.htm#" + strProgramName + "#" + location.href);
  67.     window.navigate("KnownApplications.htm#" + strProgramName + "#" + location.href);
  68. }
  69.  
  70. function DrawProgramName(strProgramName)
  71. {
  72.     //Build string to represent which operating system we have.  This will be appended to the program name
  73.     //when we test to see if it is one we have additional info for.
  74.     var args = getArgs();
  75.     var strProgNameWithOS = strProgramName;
  76.  
  77.     //Special case for "Windows Subsystem"
  78.     if (strProgNameWithOS == "Windows Subsystem")
  79.     {
  80.         strProgNameWithOS = "subsystem";
  81.     }
  82.  
  83.     if (args.os)
  84.     {
  85.       strProgNameWithOS = args.os + "_" + strProgNameWithOS;
  86.     }
  87.  
  88.     strKnownApplicationList = strKnownApplicationList.toLowerCase();
  89.     if (strKnownApplicationList.indexOf(strProgNameWithOS.toLowerCase()) >= 0)
  90.     {
  91.         oPROGNAME.innerHTML = "<a href='KnownApplications.htm" + "?from=" + location.href + "#" + strProgramName + "' onClick=\"DrawPopup('" + strProgNameWithOS + "');return false\">" + strProgramName + "</a>";
  92.         //alert(oPROGNAME.innerHTML);
  93.     }
  94.     else
  95.     {
  96.         oPROGNAME.innerText = strProgramName;
  97.     }
  98. }
  99.  
  100. function DrawLink(strIPAddr)
  101. {
  102.     strRet = "<a>" + strIPAddr + "</a>";
  103.  
  104.     return strRet;
  105. }
  106.  
  107. function ToggleMoreDetails()
  108. {
  109.     if(window.oMORE_DETAILS_TEXT.style.display == "")
  110.     {
  111.         window.oMORE_DETAILS_TEXT.style.display ="none";
  112.         img_Arrow_MoreDetails.src = "blue_arrow_rt.gif";
  113.     }
  114.     else
  115.     {
  116.         window.oMORE_DETAILS_TEXT.style.display ="";    
  117.         img_Arrow_MoreDetails.src = "blue_arrow_dn.gif";
  118.     }
  119. }
  120.  
  121. function ToggleReduceAlerts()
  122. {
  123.     if(window.oREDUCE_ALERTS_TEXT.style.display == "")
  124.     {
  125.         window.oREDUCE_ALERTS_TEXT.style.display ="none";
  126.         img_Arrow_ReduceAlerts.src = "blue_arrow_rt.gif";
  127.     }
  128.     else
  129.     {
  130.         window.oREDUCE_ALERTS_TEXT.style.display ="";    
  131.         img_Arrow_ReduceAlerts.src = "blue_arrow_dn.gif";
  132.     }
  133. }
  134.  
  135. function ToggleWhatShouldIDo()
  136. {
  137.     if(window.oWHAT_SHOULD_I_DO_TEXT.style.display == "")
  138.     {
  139.         window.oWHAT_SHOULD_I_DO_TEXT.style.display ="none";
  140.         img_Arrow_WhatShouldIDo.src = "blue_arrow_rt.gif";
  141.     }
  142.     else
  143.     {
  144.         window.oWHAT_SHOULD_I_DO_TEXT.style.display ="";
  145.         img_Arrow_WhatShouldIDo.src = "blue_arrow_dn.gif";
  146.     }
  147. }
  148.  
  149. function CollapseSections()
  150. {
  151.     // Collapse these text by default
  152.     window.oMORE_DETAILS_TEXT.style.display ="none";
  153.     img_Arrow_MoreDetails.src = "blue_arrow_rt.gif";
  154.     window.oREDUCE_ALERTS_TEXT.style.display ="none";
  155.     img_Arrow_ReduceAlerts.src = "blue_arrow_rt.gif";
  156.     window.oWHAT_SHOULD_I_DO_TEXT.style.display ="none";
  157.     img_Arrow_WhatShouldIDo.src = "blue_arrow_rt.gif";
  158. }